All right, so the first step to mastering Vin is obviously entering and exiting them.
Now, actually, this has been portrayed by many as to be so very difficult that it's practically impossible
to exit film.
Actually, this meme or however you want to call it, is so inaccurate.
It's so easy to enter and exit film that once you've mastered it, you probably hardly ever think about
it.
So here I have a typical documents folder on a Raspberry Pi, and we're going to use this as an example.
And I'm going to use Raspberry Pi for some of my course, if not all, of course, here.
So I'm in the documents folder in the misc, some folder of documents, and we'll look at how many documents.
OK, so, you know, it's nothing really particularly exciting.
So I'm going to enter in them to the first document that I see, which is a text, just type them and
the name of the file and that opens it up in film.
It really is that simple.
And as I say, this is so you can see this is a document that specifically made for this course.
And I show you how to enter and exit with this as an example.
So if I were to exit, I just hit the Kolinsky and then cue and that leaves them.
It's easy now if I wanted to get back right.
And let's say I make a change and make this.
Make this into a capital T here.
I mean, as you can see, I'm making a little change here and I'm just editing the file, as you would.
And, you know, it's really kind of simple.
I mean, if I wanted to leave, I would just simply could escape getting out of insert mode and then
hit the colon again.
And then if I wanted to discard changes, I recut and then the exclamation point.
So if you want to leave a file and not make any changes permanent, you just hit the cue or the colon
cue and an exclamation point.
So let's get back into it.
Let's review that again.
See, as you can see, the changes haven't been made.
So if I wanted to make basically this into.
You know, basically, I wanted to edit the file again, I would edit this file.
OK, and then I would just simply, you know, adding a little bit into it here.
And then I'm going to get out of insert mode barbecue, as you could see, mean insert mode at the bottom
left of the screen.
You always want to be able to get out of the insert mode when you want to exit film.
So I hit the column and I want to write this now.
I want to save this.
So I'm going to hit W OK w means right and now I've saved it.
Now if I wanted to leave I could hit cue and since I've saved it, I'm not going to discard the changes
of a cue and that will leave the file.
Now if I wanted to discard any changes, I made that file in cue exclamation point.
OK, so as you can see, we're entering and exiting them very easily.
It's not that complicated.
You don't have to worry about it.
We'll do that one more time.
Repetition.
So let's say I wanted to make a change to the file and basically save it.
So I'm going to basically edit this and I'll explain exactly how I'm doing that in later videos.
But I'm editing this so that, you know, basically is what I wanted to insert mode for some reason
editing this.
So it makes more sense now if I wanted to exit the file again, I would wanted Colin and then W and
then Q Lowercase Q and that will write the file and then leave basically that will save the file and
then exit the film.
OK, so to open film you have them and then the file and that will open the file that you are wanting
to edit.
And then if you want to leave you had colon.
Q If you wanted to exit or colon wq if you wanted to write and save colon w if you just wanted to write
it or colon.
Q Exclamation point.
If you wanted to write it without saving it, does that make any sense?
Now let's say we wanted to create a file that doesn't exist, so we'll call it doesn't exist.
That text actually spelled that right.
So just text and that's just like touch.
What that does is it creates the file so that creates a new blank file.
So I'll just type in nonsense and then he'll escape.
Getting out of insert mode hit colon hit w save it.
Now that saved the file and you know his colon.
Q And I'll leave and see if it saved it.
As you can see it saved it.
Now if I hit if I had hit Colon and Q exclamation point even though I created the file, if I didn't
save the changes in Vim and actually wouldn't have created the file it would have just simply wiped
it out.
OK, so that's just the beginning entry beginning introduction to exiting and entering and exiting with
them.
It's not that complicated.